Hello and welcome to
the demonstration on using the Continue
Activity inside a process. In this video, you will learn to create a workflow
that will identify even numbers from a list
of numbers. Let's begin. Search for an assign activity in the activities panel and drag and drop it in
the designer panel. A sequence is
automatically created when an activity is dropped in
the empty designer panel. Let's rename the
sequence activity and add an annotation to it. Then renamed the
assign activity also. Open the variables panel. In the name column, enter a variable name,
list of numbers. In the variable type column, select the array of type option
from the drop-down menu. In the select types
pop-up window, select Int32 from the drop-down
menu and click "Okay." It changes the variable type of the list of numbers variable, from string to an
array of integers. Close the variables panel. Now in the first text box
at the assign activity, enter the variable,
list of numbers. In the second text
box of the activity, enter a list of numbers inside curly braces
separated by commas. Search for a for each activity
in the activities panel, and drag and drop it below
the assign activity. From the property panel, change the type
argument to Int32. Rename and annotate
this activity. In the second text box of
the for each activity, enter the variable
list of numbers. Search for an if activity
in the activities panel, and drag and drop it in the body section of
the for each activity. Rename and annotate
this activity. In the condition text
box of the activity, enter the expression, item mod 2 equal to zero. This expression
divides each item of list of numbers by two, and compares its
remainder with zero. Here, if the condition is true, the remainder is equal to zero, then the activities within the then section will be executed. On the other hand, if the
condition is false, that is, the remainder is
not equal to zero, then the activities within the else section
will be executed. Now, search for a
write line activity in the activities panel, and drag and drop it
below in the if activity. Rename this activity. In the text box of the activity, enter the expression
item.ToString. Generally, when an activity is placed after the If activity, it executes after the
execution of the if activity. It means that whether
the activities of the then or else
section are executed, the write line
activity inserted here should have been executed
in both scenarios. However, as we have inserted a continue activity
inside the else section, the write line activity will not execute if the condition of
the if activity is false. Click "Save" to
save the project. Select "Run" from
the debug file menu on the design ribbon, to run the project. Now, let's open
the output panel. You can see that all
the even numbers from the list of numbers
are displayed here. This brings us to the end
of this demonstration. Thank you for watching.